<?php // no direct access
defined('_JEXEC') or die('Restricted access');
?>
<link rel="stylesheet" type="text/css" media="screen" href="<?php print $this->template_dir; ?>css/vmenu.css" />
<script type="text/javascript" src="<?php print $this->template_dir; ?>js/toggle.js"></script>
<script src="<?php echo $this->template_dir ;?>js/validate/jquery.validate.js" type="text/javascript"></script>

<div id="main-container" class="full">
            <div class="inner clearfix">
                
                <div id="main-body">
                    <div id="main-content">
                    	<div class="contact">
                        	<div class="contact-info">
                            	<img src="<?php echo $this->template_dir ;?>img/small-logo.png" alt="" />
                            	<?php
	                            	 jimport('mylibs.globalModel');
									 $globalModel = new globalModel();
									 $intro = $globalModel->getArticle(99); 
	                    			 echo $intro['introtext'];               
	                            ?>                                
                            </div>
                            <div class="contact-form">
                            	<h3>Kontakt Form</h3>
                                <form action="<?php echo $this->action ?>" method="post" name="kontaktForm" id="kontaktForm">
                                	<input id="name" name="name" type="text" class="input-text" value="Navn" onblur="if(this.value=='') this.value='Navn';" onfocus="if(this.value=='Navn') this.value='';" /><br />
                                    <input id="email" name="email" type="text" class="input-text" value="Email" onblur="if(this.value=='') this.value='Email';" onfocus="if(this.value=='Email') this.value='';" /><br />
                                    <input id="subject" name="subject" type="text" class="input-text" value="Emne" onblur="if(this.value=='') this.value='Emne';" onfocus="if(this.value=='Emne') this.value='';" /><br />
                                    <textarea id="message" name="message" cols="" rows="" class="input-text" onblur="if(this.value=='') this.value='Besked...';" onfocus="if(this.value=='Besked...') this.value='';" >Besked...</textarea><br />
                                    <input type="submit" value="Send" class="btn-send" style="border: 0px;"/>
                                    <input type="reset" value="Nulstil" class="btn-nulstil" style="border: 0px;"/>                                    
                                    <input type="hidden" name="option" value="com_kontakt" />
									<input type="hidden" name="controller" value="" />
									<input type="hidden" name="task" id="task" value="submit" />
									<?php echo JHTML::_( 'form.token' ); ?>
                                </form>
                            </div>
                        </div>
                    </div><!--main-content-->
                </div><!--main-body-->
                
            </div>    	        
</div>

<!--<input type="submit" value="Send" class="bg_send_but"/> -->
<!--<input type="reset" value="Nulstil" class="bg_reset_but"/> -->
     
<script language="javascript">
	jQuery(document).ready(function($) {
		//jQuery.updnWatermark.attachAll();
			
		jQuery("#kontaktForm").validate({
			errorPlacement: function(error, element) {			
			},
			invalidHandler: function(form, validator) {
			  var errors = validator.numberOfInvalids();
			  if (errors) {
				alert(validator['errorList'][0]['message']);
				validator['errorList'][0]['element'].focus();
			  } else {
			  }
			},

			rules: {
				name: "required",
				subject: "required",
				message: "required",
				email: {
					required: true,
					email: true
				}
			},
			messages: {
				name: "<?php echo JText::_( 'Indtast dit navn' ); ?>",
				subject: "<?php echo JText::_( 'Indtast emne' ); ?>",
				message: "<?php echo JText::_( 'Indtast besked' ); ?>",
				email: "<?php echo JText::_( 'Angiv en gyldig e-mail adresse' ); ?>"
			}
		});
	});
</script>
